import request from "@/utils/request";

// 查询招生信息列表
export function listRegisterNeed(query) {
  return request({
    url: "/business/registerNeed/list",
    method: "get",
    params: query,
  });
}

// 查询招生信息所有列表
export function listAllRegisterNeed(query) {
  return request({
    url: "/business/registerNeed/listAll",
    method: "get",
    params: query,
  });
}

// 查询招生信息详细
export function getRegisterNeed(id) {
  return request({
    url: "/business/registerNeed/getInfo/" + id,
    method: "get",
  });
}

// 新增招生信息
export function addRegisterNeed(data) {
  return request({
    url: "/business/registerNeed/add",
    method: "post",
    data: data,
  });
}

// 修改招生信息
export function updateRegisterNeed(data) {
  return request({
    url: "/business/registerNeed/edit",
    method: "post",
    data: data,
  });
}

// 删除招生信息
export function delRegisterNeed(id) {
  return request({
    url: "/business/registerNeed/remove/" + id,
    method: "get",
  });
}

// 查询所有批次时间
export function batchListAll() {
  return request({
    url: "/business/registerDconfig/listAll",
    method: "get",
  });
}

// 修改批次时间
export function updateBatchTime(data) {
  return request({
    url: "/business/registerDconfig/edit",
    method: "post",
    data: data,
  });
}

// 更新招生状态
export function updateRegisterNeedStatus(data) {
  return request({
    url: "/business/registerNeed/updateStatus",
    method: "post",
    data: data,
  });
}
